home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Tele / R / Ringcounter < prev    next >
Text File  |  1987-12-07  |  2KB  |  93 lines

  1. (This short procedure can be run while your computer
  2. (is unattended and will count all of the RINGs that
  3. (are echoed to the screen display.  The procedure
  4. (will recycle after 5 seconds of no RINGs.  The
  5. (info is automatically written to an existing file called
  6. (CALLS on the Disk COM.  Of course this can be
  7. (changed to fit your needs
  8.  
  9. (To use this procedure, your modem must be set so
  10. (that it echos a RING to your screen each time your
  11. (computer line receives a ring
  12.  
  13. (Start procedure
  14. :BEGIN
  15. CLEAR
  16. TYPE ^M
  17. TYPE ^M
  18. TYPE ^M
  19. TYPE                       No incoming calls detected^M
  20. TYPE                               <Q> to Quit^M
  21. :START
  22. PAUSE 120
  23. ALERT1 Q/JUMPTO END
  24. ALERT2 q/JUMPTO END
  25. ALERT3 X/JUMPTO BEGIN
  26. PROMPT RING
  27. LET EQUAL R%,1
  28.  
  29. (Count rings and set default timeout to 15 seconds
  30. :RING
  31. PANICAFTER 15
  32. ONPANIC JUMPTO TIME
  33. PROMPT RING
  34. ADD R%,1
  35. JUMPTO RING
  36.  
  37. (Get time and date in correct formats)
  38. :TIME
  39. GETGLOBAL O%,5
  40. GETGLOBAL D%,6
  41. GETGLOBAL H%,8
  42. GETGLOBAL M%,9
  43. TEST H% > 12
  44. IF YES LET EQUAL Y%,1
  45. IF NO LET EQUAL Y%,0
  46. IF YES SUBTRACT H%,12
  47. TEST M% < 10
  48. IF YES COPYINTO T$,0
  49. NUMTOSTRING M%,M$
  50. IF YES CONCAT T$,M$
  51. IF YES COPYINTO M$,T$
  52. NUMTOSTRING H%,H$
  53. NUMTOSTRING R%,R$
  54. NUMTOSTRING O%,O$
  55. NUMTOSTRING D%,D$
  56.  
  57. (Type screen display)
  58. CLEAR
  59. TYPE O$
  60. TYPE /
  61. TYPE D$
  62. TYPE  -- 
  63. TYPE H$
  64. TYPE :
  65. TYPE M$
  66. TEST Y% = 1
  67. IF YES TYPE P.M.
  68. TYPE   You had 
  69. TYPE R$
  70. TYPE  Ring(s)
  71. TYPE ^M
  72.  
  73. (Send information to disk
  74. USEROPENA 1,COM:CALLS
  75. GETLINE 1,W$
  76. PAUSE 120
  77. CLEAR
  78. TYPE ^M
  79. TYPE ^M
  80. TYPE ^M
  81. TYPE                              Incoming Call(s) detected^M
  82. TYPE                                     <Q> to Quit^M
  83. TYPE                                    <X> to Reset ^M
  84. USERWRITE 1,W$
  85. USERWRCR 1
  86. USERCLOSE 1
  87.  
  88. (Recycle)
  89. JUMPTO START
  90. :END
  91. CLEAR
  92. END